@model Forum
@using (Ajax.BeginAjaxForm("Edit", "Forum", new jQueryAjaxOptions()
   {
       HttpMethod="POST",
       AutoBlocking = true,
       OnSuccess = "$('#forumTree').dtree('option','selectedNode').children('.d-treenode-content').find('span').text($('#Forum_Title').val());"
   }, new RouteValueDictionary(new { id = Model.ID }), null))
{
    @Html.AntiForgeryToken() 
    <div>
        <div style="margin-bottom: 10px;">
            @if (Model.IsGroup)
            {
                <img src="@Url.Content("~/Content/Images/comments.png")" alt="" style="float: left;" />
            }
            else
            {
                <img src="@Url.Content("~/Content/Images/icon-comment-32.png")" alt="" style="float: left;" />
            }
            <h3 style="margin: 5px 0px 0px 5px; float: left;">
                @Model.Title
            </h3>
            <div style="clear: both;">
            </div>
        </div>
        @{ Html.RenderPartial("ForumForm", Model); }
        @if (WebSiteContext.Current.IsAuthorized<DNA.Mvc.Community.Controllers.ForumController>("Edit"))
        {
        <div style="margin-top: 5px; padding: 5px; text-align: center;">
            @(Ajax.Dna().Button("btnSaveEditForum")
               .LocText("RES_SAVE")
               .Submit()
               .ImageIcons(Url.Content("~/content/images/icon_save.gif"))
              .GetHtml())
        </div>
        }
    </div>
}
@Html.StartupScripts()
